findElementByTagName

abstract fun findElementByTagName(tagName: String): Optional<Element>

Returns the first Element object found in the current search context by the given tagName. Returns an empty Optional if no element was found.

Parameters

tagName

a string that represents the tag name of the HTML element

Throws

if the given tagName is empty

when this instance is closed